package demo2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class DEMO_02 {
    public static void main(String[] args) throws IOException {
        InputStream inputStream=new FileInputStream("D:/temp/text2.txt");
        byte[] bytes=new byte[256];
        while (true){
            int len = inputStream.read(bytes);
            if(len==-1) break;
            for (int i = 0; i < len; i++) {
                System.out.println(bytes[i]);
            }
        }
        inputStream.close();
    }
}
